﻿<%if not in_sdcms then response.write("template load fail"):response.end() end if%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{sdcms[seokey]}" />
<meta name="Description" content="{sdcms[seodesc]}" />
<title>{sdcms[webname]} - powered by sdcms</title>
<link href="{webroot}lib/css/base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/public.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_login.css" rel="stylesheet" type="text/css" />
<script>var webroot="{webroot}";</script>
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/js/mobile.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/default/js/sdcms.js"></script>
<script>
$(function(){
	$(".form_login").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"?act=login",
				type:"post",
				data:$(form).serialize(),
				success:function(data){
					data=jQuery.parseJSON(data);
					var type="warn";
					if(data.status=="y"){type="ok";}
					$.fn.tips({type:type,content:data.info});
					if(data.status=="y")
					{
						var gourl=$("#gourl").attr("value");
						if(gourl==""){gourl="./"}
						if(gourl.indexOf("login.asp")!=-1||gourl.indexOf("reg.asp")!=-1){gourl="./"}
						setTimeout(function(){location.href=gourl},1000);
					}
				}
			});
		}
	});
})
</script>
</head>

<body>
    {sdcms:include("../sdcms_head.asp")}
    
    <div id="position">您所在的位置：<a href="{webroot}">首页</a> > <a href="{webroot}user/login.asp">会员登录</a></div>
    <div class="w980 mt10 mc">
        <div class="w900 bt">
           <div class="title">会员登录</div>
           <div id="userbase">
               <div class="left">
                    <form class="form_login" method="post">
                    <ul id="login">
                        {if msg<>""}<li class="msg">{msg}</li>{/if}
                        <li>账户：<input type="text" name="username" class="ip" data-rule="账户:required;username;" /></li>
                        <li>密码：<input type="password" name="password" class="ip" data-rule="密码:required;password;" /></li>
                        <li class="p42"><input type="hidden" name="gourl" id="gourl" value="{gourl}" /><input type="submit" value="登录" class="bnt_yellow" /> <input type="button" value="忘记密码" onclick="location.href='getpass.asp'" class="bnt_blue" /></li>
                    </ul>
                    </form>
               </div>
               <div class="midline"></div>
               <div class="info">
                   <p>还没有帐号？</p>
                   <p class="bnt"><a href="reg.asp?url={gourl}">立即注册</a></p>
                   <p>想快速体验？使用以下帐号登录： </p>
                   {sdcms:rs field="setkey,setvalue" table="sd_config" where="setname='sdcms.api.login'"}
                   {dim api_arr:api_arr=split($rs[setkey],".")}
                   {dim api_key:api_key=api_arr(0)}
                   {dim setvalue:setvalue=eval($rs[setvalue])}
                   {if setvalue(0)<>""}
                   <p><a href="{webroot}api/login/{api_key}/api.asp?url={gourl}"><img src="{webroot}api/login/{api_key}/images/login.gif" border="0" /></a></p>
                   {/if}
                   {/sdcms:rs}
               </div>
           </div>
        </div>
    </div>
    {sdcms:include("../sdcms_foot.asp")}